{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "name": "To_do_PTA.ipynb",
      "provenance": [],
      "authorship_tag": "ABX9TyNQxUT7Wfde220sXYiT8lV2",
      "include_colab_link": true
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    },
    "widgets": {
      "application/vnd.jupyter.widget-state+json": {
        "93ba6f48e4484334b4cab053ceca9e6a": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "VBoxModel",
          "state": {
            "_view_name": "VBoxView",
            "_dom_classes": [
              "widget-interact"
            ],
            "_model_name": "VBoxModel",
            "_view_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_view_count": null,
            "_view_module_version": "1.5.0",
            "box_style": "",
            "layout": "IPY_MODEL_213ef2c7887d4df79b0191af81fc0c99",
            "_model_module": "@jupyter-widgets/controls",
            "children": [
              "IPY_MODEL_9661af6cd94745a28515d24ac024b004",
              "IPY_MODEL_70417e3435de4abfa72ac3f9864fab16",
              "IPY_MODEL_b871050baa594651bbd5185587cc59da",
              "IPY_MODEL_5b2a4fb939b54b2c95687dbfc2c12cb0"
            ]
          }
        },
        "213ef2c7887d4df79b0191af81fc0c99": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "state": {
            "_view_name": "LayoutView",
            "grid_template_rows": null,
            "right": null,
            "justify_content": null,
            "_view_module": "@jupyter-widgets/base",
            "overflow": null,
            "_model_module_version": "1.2.0",
            "_view_count": null,
            "flex_flow": null,
            "width": null,
            "min_width": null,
            "border": null,
            "align_items": null,
            "bottom": null,
            "_model_module": "@jupyter-widgets/base",
            "top": null,
            "grid_column": null,
            "overflow_y": null,
            "overflow_x": null,
            "grid_auto_flow": null,
            "grid_area": null,
            "grid_template_columns": null,
            "flex": null,
            "_model_name": "LayoutModel",
            "justify_items": null,
            "grid_row": null,
            "max_height": null,
            "align_content": null,
            "visibility": null,
            "align_self": null,
            "height": null,
            "min_height": null,
            "padding": null,
            "grid_auto_rows": null,
            "grid_gap": null,
            "max_width": null,
            "order": null,
            "_view_module_version": "1.2.0",
            "grid_template_areas": null,
            "object_position": null,
            "object_fit": null,
            "grid_auto_columns": null,
            "margin": null,
            "display": null,
            "left": null
          }
        },
        "9661af6cd94745a28515d24ac024b004": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "IntSliderModel",
          "state": {
            "_view_name": "IntSliderView",
            "style": "IPY_MODEL_689f7e9470d741f3987ce035a9e00d8f",
            "_dom_classes": [],
            "description": "t",
            "step": 1,
            "_model_name": "IntSliderModel",
            "orientation": "horizontal",
            "max": 1000,
            "_view_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "value": 373,
            "_view_count": null,
            "disabled": false,
            "_view_module_version": "1.5.0",
            "min": 1,
            "continuous_update": true,
            "readout_format": "d",
            "description_tooltip": null,
            "readout": true,
            "_model_module": "@jupyter-widgets/controls",
            "layout": "IPY_MODEL_27c870bacc0d476ca52afd3e50c30a9b"
          }
        },
        "70417e3435de4abfa72ac3f9864fab16": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "IntSliderModel",
          "state": {
            "_view_name": "IntSliderView",
            "style": "IPY_MODEL_4efa31c4c2ae4960bb17bf47343de7da",
            "_dom_classes": [],
            "description": "k",
            "step": 1,
            "_model_name": "IntSliderModel",
            "orientation": "horizontal",
            "max": 500,
            "_view_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "value": 300,
            "_view_count": null,
            "disabled": false,
            "_view_module_version": "1.5.0",
            "min": 100,
            "continuous_update": true,
            "readout_format": "d",
            "description_tooltip": null,
            "readout": true,
            "_model_module": "@jupyter-widgets/controls",
            "layout": "IPY_MODEL_3ce97130ed9440e6b168d2d1791ee8ad"
          }
        },
        "b871050baa594651bbd5185587cc59da": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "IntSliderModel",
          "state": {
            "_view_name": "IntSliderView",
            "style": "IPY_MODEL_97740731fb2b4182a7c0722d6a803074",
            "_dom_classes": [],
            "description": "mu",
            "step": 1,
            "_model_name": "IntSliderModel",
            "orientation": "horizontal",
            "max": 100,
            "_view_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "value": 50,
            "_view_count": null,
            "disabled": false,
            "_view_module_version": "1.5.0",
            "min": 1,
            "continuous_update": true,
            "readout_format": "d",
            "description_tooltip": null,
            "readout": true,
            "_model_module": "@jupyter-widgets/controls",
            "layout": "IPY_MODEL_8419a58982994132b054eec16c6729cd"
          }
        },
        "5b2a4fb939b54b2c95687dbfc2c12cb0": {
          "model_module": "@jupyter-widgets/output",
          "model_name": "OutputModel",
          "state": {
            "_view_name": "OutputView",
            "msg_id": "",
            "_dom_classes": [],
            "_model_name": "OutputModel",
            "outputs": [
              {
                "output_type": "stream",
                "metadata": {
                  "tags": []
                },
                "text": "/usr/local/lib/python3.6/dist-packages/ipykernel_launcher.py:42: UserWarning: Attempted to set non-positive left xlim on a log-scaled axis.\nInvalid limit will be ignored.\n",
                "stream": "stderr"
              },
              {
                "output_type": "display_data",
                "metadata": {
                  "tags": [],
                  "needs_background": "light"
                },
                "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAEACAYAAABfxaZOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAOMUlEQVR4nO3ccaxed13H8feHlgGZygpcm6Zt3AyNS/lDwCfbDPyBoF03jd0fC04NNKSxIUGDiYluaLLIiGH/OF0UTGWEjiijGeIqQWdTMMREoE8BgW7MXsVlbQq9cMuUYDCdX/+4v5KH7t7e53b3Ps/tfu9XcvOc8/39zjm/0558zsl5znNSVUiS+vCCaQ9AkjQ5hr4kdcTQl6SOGPqS1BFDX5I6YuhLUkfGCv0k/5nkK0m+lGTYai9LciTJyfa5qdWT5P4ks0m+nOS1I+vZ2/qfTLJ3bXZ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qaZthcfK31bVbwBvB35lGuN9PjD0tRY+BOweLfiyPS3hQ6z8WPmD1q7LYOhr1VXVZ4D5i8q+bE/PspJjJQvuBf6+qr4w6bE+Xxj6mpTFXra3NcnLk/wF8Jokd01naFpnFj1WgN8Cfh64PcnbpzGw54NJv2VT+iFV9W0W7tFKl1RV9wP3T3scVzqv9DUp037Znq4cHitryNDXpBwDdiS5LslVwB3A4SmPSeuTx8oaMvS16pJ8BPgX4KeSnEqyr6rOAxdetvc4cMiX7cljZfJ84ZokdcQrfUnqiKEvSR0x9CWpI4a+JHXE0Jekjhj6ktQRQ1+SOmLoS1JHDH1J6sj/A/zB0NTfMSfpAAAAAElFTkSuQmCC\n",
                "text/plain": "<Figure size 432x288 with 1 Axes>"
              }
            ],
            "_view_module": "@jupyter-widgets/output",
            "_model_module_version": "1.0.0",
            "_view_count": null,
            "_view_module_version": "1.0.0",
            "layout": "IPY_MODEL_53ae80b8073f4f96add76f2781a4b9dc",
            "_model_module": "@jupyter-widgets/output"
          }
        },
        "689f7e9470d741f3987ce035a9e00d8f": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "SliderStyleModel",
          "state": {
            "_view_name": "StyleView",
            "handle_color": null,
            "_model_name": "SliderStyleModel",
            "description_width": "",
            "_view_module": "@jupyter-widgets/base",
            "_model_module_version": "1.5.0",
            "_view_count": null,
            "_view_module_version": "1.2.0",
            "_model_module": "@jupyter-widgets/controls"
          }
        },
        "27c870bacc0d476ca52afd3e50c30a9b": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "state": {
            "_view_name": "LayoutView",
            "grid_template_rows": null,
            "right": null,
            "justify_content": null,
            "_view_module": "@jupyter-widgets/base",
            "overflow": null,
            "_model_module_version": "1.2.0",
            "_view_count": null,
            "flex_flow": null,
            "width": null,
            "min_width": null,
            "border": null,
            "align_items": null,
            "bottom": null,
            "_model_module": "@jupyter-widgets/base",
            "top": null,
            "grid_column": null,
            "overflow_y": null,
            "overflow_x": null,
            "grid_auto_flow": null,
            "grid_area": null,
            "grid_template_columns": null,
            "flex": null,
            "_model_name": "LayoutModel",
            "justify_items": null,
            "grid_row": null,
            "max_height": null,
            "align_content": null,
            "visibility": null,
            "align_self": null,
            "height": null,
            "min_height": null,
            "padding": null,
            "grid_auto_rows": null,
            "grid_gap": null,
            "max_width": null,
            "order": null,
            "_view_module_version": "1.2.0",
            "grid_template_areas": null,
            "object_position": null,
            "object_fit": null,
            "grid_auto_columns": null,
            "margin": null,
            "display": null,
            "left": null
          }
        },
        "4efa31c4c2ae4960bb17bf47343de7da": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "SliderStyleModel",
          "state": {
            "_view_name": "StyleView",
            "handle_color": null,
            "_model_name": "SliderStyleModel",
            "description_width": "",
            "_view_module": "@jupyter-widgets/base",
            "_model_module_version": "1.5.0",
            "_view_count": null,
            "_view_module_version": "1.2.0",
            "_model_module": "@jupyter-widgets/controls"
          }
        },
        "3ce97130ed9440e6b168d2d1791ee8ad": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "state": {
            "_view_name": "LayoutView",
            "grid_template_rows": null,
            "right": null,
            "justify_content": null,
            "_view_module": "@jupyter-widgets/base",
            "overflow": null,
            "_model_module_version": "1.2.0",
            "_view_count": null,
            "flex_flow": null,
            "width": null,
            "min_width": null,
            "border": null,
            "align_items": null,
            "bottom": null,
            "_model_module": "@jupyter-widgets/base",
            "top": null,
            "grid_column": null,
            "overflow_y": null,
            "overflow_x": null,
            "grid_auto_flow": null,
            "grid_area": null,
            "grid_template_columns": null,
            "flex": null,
            "_model_name": "LayoutModel",
            "justify_items": null,
            "grid_row": null,
            "max_height": null,
            "align_content": null,
            "visibility": null,
            "align_self": null,
            "height": null,
            "min_height": null,
            "padding": null,
            "grid_auto_rows": null,
            "grid_gap": null,
            "max_width": null,
            "order": null,
            "_view_module_version": "1.2.0",
            "grid_template_areas": null,
            "object_position": null,
            "object_fit": null,
            "grid_auto_columns": null,
            "margin": null,
            "display": null,
            "left": null
          }
        },
        "97740731fb2b4182a7c0722d6a803074": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "SliderStyleModel",
          "state": {
            "_view_name": "StyleView",
            "handle_color": null,
            "_model_name": "SliderStyleModel",
            "description_width": "",
            "_view_module": "@jupyter-widgets/base",
            "_model_module_version": "1.5.0",
            "_view_count": null,
            "_view_module_version": "1.2.0",
            "_model_module": "@jupyter-widgets/controls"
          }
        },
        "8419a58982994132b054eec16c6729cd": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "state": {
            "_view_name": "LayoutView",
            "grid_template_rows": null,
            "right": null,
            "justify_content": null,
            "_view_module": "@jupyter-widgets/base",
            "overflow": null,
            "_model_module_version": "1.2.0",
            "_view_count": null,
            "flex_flow": null,
            "width": null,
            "min_width": null,
            "border": null,
            "align_items": null,
            "bottom": null,
            "_model_module": "@jupyter-widgets/base",
            "top": null,
            "grid_column": null,
            "overflow_y": null,
            "overflow_x": null,
            "grid_auto_flow": null,
            "grid_area": null,
            "grid_template_columns": null,
            "flex": null,
            "_model_name": "LayoutModel",
            "justify_items": null,
            "grid_row": null,
            "max_height": null,
            "align_content": null,
            "visibility": null,
            "align_self": null,
            "height": null,
            "min_height": null,
            "padding": null,
            "grid_auto_rows": null,
            "grid_gap": null,
            "max_width": null,
            "order": null,
            "_view_module_version": "1.2.0",
            "grid_template_areas": null,
            "object_position": null,
            "object_fit": null,
            "grid_auto_columns": null,
            "margin": null,
            "display": null,
            "left": null
          }
        },
        "53ae80b8073f4f96add76f2781a4b9dc": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "state": {
            "_view_name": "LayoutView",
            "grid_template_rows": null,
            "right": null,
            "justify_content": null,
            "_view_module": "@jupyter-widgets/base",
            "overflow": null,
            "_model_module_version": "1.2.0",
            "_view_count": null,
            "flex_flow": null,
            "width": null,
            "min_width": null,
            "border": null,
            "align_items": null,
            "bottom": null,
            "_model_module": "@jupyter-widgets/base",
            "top": null,
            "grid_column": null,
            "overflow_y": null,
            "overflow_x": null,
            "grid_auto_flow": null,
            "grid_area": null,
            "grid_template_columns": null,
            "flex": null,
            "_model_name": "LayoutModel",
            "justify_items": null,
            "grid_row": null,
            "max_height": null,
            "align_content": null,
            "visibility": null,
            "align_self": null,
            "height": null,
            "min_height": null,
            "padding": null,
            "grid_auto_rows": null,
            "grid_gap": null,
            "max_width": null,
            "order": null,
            "_view_module_version": "1.2.0",
            "grid_template_areas": null,
            "object_position": null,
            "object_fit": null,
            "grid_auto_columns": null,
            "margin": null,
            "display": null,
            "left": null
          }
        }
      }
    }
  },
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "view-in-github",
        "colab_type": "text"
      },
      "source": [
        "<a href=\"https://colab.research.google.com/github/Divyanshu-ISM/Oil-and-Gas-data-analysis/blob/master/To_do_PTA.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "iGgk5uw3qdfj",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "import numpy as np\n",
        "import matplotlib.pyplot as plt\n",
        "%matplotlib inline\n",
        "\n",
        "from ipywidgets import interact, interactive\n",
        "from IPython.display import clear_output, display, HTML"
      ],
      "execution_count": 1,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "DvyT5gbAubhh",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "from scipy.special import expi"
      ],
      "execution_count": 8,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "INiodlC1n-yQ",
        "colab_type": "text"
      },
      "source": [
        "#Pressure Transient Analysis (Analytical Solution)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "LgoCZjL4oDaU",
        "colab_type": "text"
      },
      "source": [
        "## $ P_{wf} =  P_i - \\frac{162.6q\\mu B}{kh}(log(\\frac{kt}{\\phi \\mu c_t r_w^2}) -3.23 + 0.87*s)$\n",
        "\n",
        "## $ P_{r} =  P_i - \\frac{162.6q\\mu B}{kh}(log(\\frac{kt}{\\phi \\mu c_t r^2}) -3.23 + 0.87*s)$"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "pa0aVcLAn7Nd",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "def unsteady_profile(t,k,mu):\n",
        "\n",
        "  Pi = 5000 #psi\n",
        "\n",
        "  q = 1000 #stb/day\n",
        "\n",
        "  B  = 1.1 #rb/stb\n",
        "\n",
        "  h = 50 #ft\n",
        "\n",
        "  phi = 0.20\n",
        "\n",
        "  ct = 1E-6\n",
        "\n",
        "  re = 500\n",
        "\n",
        "  s = 0\n",
        "\n",
        "  rw = 0.5\n",
        "\n",
        "  r = np.linspace(0.5,re,200)\n",
        "\n",
        "  Pwf = []\n",
        "\n",
        "  time = np.linspace(0,t,200)\n",
        "\n",
        "  for i in range(len(time)):\n",
        "    \n",
        "    P = Pi - (162.6*q*mu*B/k/h)*(np.log10(k*t/phi/mu/ct/(rw**2)) -3.23 + 0.87*s)\n",
        "    Pwf.append(P)\n",
        "  \n",
        "\n",
        "\n",
        "  # P = Pi - (70.6*q*mu*B/k/h)*expi(948*(k*t/phi/mu/ct/(r**2)))\n",
        "\n",
        "  \n",
        "\n",
        "\n",
        "  plt.plot(time,Pwf)\n",
        "  plt.semilogx(time,Pwf)\n",
        "\n",
        "  plt.xlim(0, t)\n",
        "\n",
        "  plt.ylim(0,5000)\n",
        "\n",
        "\n",
        "  return Pwf"
      ],
      "execution_count": 37,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "Cajmf7EareSD",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "w = interactive(unsteady_profile , t=(1,1000) , k = (100,500) , mu = (1,100))"
      ],
      "execution_count": 38,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "iwqf40z6sZUH",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 403,
          "referenced_widgets": [
            "93ba6f48e4484334b4cab053ceca9e6a",
            "213ef2c7887d4df79b0191af81fc0c99",
            "9661af6cd94745a28515d24ac024b004",
            "70417e3435de4abfa72ac3f9864fab16",
            "b871050baa594651bbd5185587cc59da",
            "5b2a4fb939b54b2c95687dbfc2c12cb0",
            "689f7e9470d741f3987ce035a9e00d8f",
            "27c870bacc0d476ca52afd3e50c30a9b",
            "4efa31c4c2ae4960bb17bf47343de7da",
            "3ce97130ed9440e6b168d2d1791ee8ad",
            "97740731fb2b4182a7c0722d6a803074",
            "8419a58982994132b054eec16c6729cd",
            "53ae80b8073f4f96add76f2781a4b9dc"
          ]
        },
        "outputId": "ec854dac-90ec-4823-ae4c-c0ef69acf2f6"
      },
      "source": [
        "display(w)"
      ],
      "execution_count": 39,
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "application/vnd.jupyter.widget-view+json": {
              "model_id": "93ba6f48e4484334b4cab053ceca9e6a",
              "version_minor": 0,
              "version_major": 2
            },
            "text/plain": [
              "interactive(children=(IntSlider(value=500, description='t', max=1000, min=1), IntSlider(value=300, description…"
            ]
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "Z0efFbkisbAM",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "948*phi*mu*ct*r2/kt"
      ],
      "execution_count": null,
      "outputs": []
    }
  ]
}